home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6887 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: cs.city.ac.uk!be584
  2. From: be584@city.ac.uk (Olatunbosun S)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: fast sample retrigger
  5. Date: 4 Apr 1996 15:05:12 GMT
  6. Organization: School of Informatics, City University, London
  7. Message-ID: <4k0of8$8v7@bambam.soi.city.ac.uk>
  8. NNTP-Posting-Host: swindon.city.ac.uk
  9.  
  10.  
  11. Could somebody please, please help me with this irritating problem. I'm trying
  12. to retrigger a sample on the same audio channel but I want to do it very 
  13. quickly.  However, the audible result is that the sample regularly carries on 
  14. from where it was stopped (DMA off) instead of starting from the beginning. 
  15. I've read the RKM Devices book and understand that there must be a delay of 
  16. 2 periods before the audio channel is started again (DMA on) and so my code is
  17. something like the following
  18.  
  19.     (set up audio channel)
  20.         .
  21.         .
  22.     custom.dmacon = DMAF_AUDx    /* x = 0-3  stop DMA */
  23.         .
  24.         .
  25.     (pause for a while)
  26.         .
  27.         .
  28.     custom.dmacon = DMAF_SETCLR | DMAF_MASTER | DMAF_AUDx
  29.  
  30.  
  31. If I use a pause of "Delay(1)", which is far too long, I can get samples
  32. with high playback rates (>25000 samples per sec) to retrigger, but slower
  33. sample rates (<15000 samples per sec) ALWAYS fail. I've even tried ridiculously
  34. long delays of 2 seconds and I still get the same problem with low rate samples.
  35. So what am I doing wrong? Am I forgetting to write (reset) some other registers
  36. in the audio hardware (eg custom.aud[x].ac_ptr) before retriggering the sample?
  37.  
  38. I'm doing the above experimentation on a a basic A1200 running DICE v2.07.54
  39.  
  40. Sheun
  41.  
  42.